\begin{algorithm}[H]
    \renewcommand{\algorithmicrequire}{\textbf{Input:}}
	\renewcommand{\algorithmicensure}{\textbf{Output:}}
	\caption{利用加权模糊粗糙集做属性约简}
    \label{al:wfao}
    \begin{algorithmic}[1] % 控制是否有序号
        \Require Data Table $(U,A,D)$ ; % input 的内容
	    \Ensure Attribute Reduction $B\subseteq A$; % output 的内容
        
        \State $Red = \varnothing$;
        \State Compute $R_k(x_i,x_j)$ for each attribute $a_k$;   
        \State Compute $\left\{ \widetilde{D_1},\widetilde{D_2},\cdots,\widetilde{D_r} \right\}$
        \While{True}
            \For {$a_k\in A$ }
                \For {$D_j\in U/D$ }
                    \For {$x_i\in U$ }
                        \State Compute $S(x_i,D_j)$ and $\alpha(x_i,D_j)$.
                        \State Compute $\underline{N_{Red\bigcup \left\{ a_k \right\}}}(D_j)(x_i)$
                    \EndFor
                \EndFor
                \State Compute $\gamma_{Red\bigcup\left\{ a_k \right\}}(D)$ 
                \State Compute $\mathrm{Sig}(a_k;Red,D)=\gamma_{Red\bigcup \left\{ a_k \right\}}(D)-\gamma_{Red}(D)$ 
            \EndFor
            \State $a_{k_0}=\mathop{\arg\max}\limits_{a_k\in A-Red} \mathrm{Sig}(a_k;Red,D)$
            \If { $\mathrm{Sig}(a_{k_0};Red,D)>0$ } 
                \State $Red = Red \bigcup \left\{ a_{k_0} \right\}$ 
            \Else
                \State \textbf{return} $Red$.

            \EndIf 
        \EndWhile
    \end{algorithmic}
\end{algorithm}